<?php
  // 引入公共的封装模块
  include './common.php';
  // 获取数据
  $res = getData("select id,name,photo,gender,birthday from userInfo");
  foreach($res as $key=>$item){
    $curr_year=date('Y',time());
    $timestamp=strtotime($item['birthday']);
    $birth_year=date('Y',$timestamp);
    $age=$curr_year-$birth_year;
    $res[$key]['age']=$age;
  }
  require_once 'views/lists_tpl.php'
?>
